<template>
  <div class="service">
    <!--头部信息-->
    <div class="top">
      <el-breadcrumb separator="/">
        <el-breadcrumb-item>您的位置:</el-breadcrumb-item>
        <el-breadcrumb-item :to="{ path: '/main' }" @click="toHome"
          >首页</el-breadcrumb-item
        >
        <el-breadcrumb-item>自助服务</el-breadcrumb-item>
      </el-breadcrumb>
    </div>
    <el-container>
      <!--左边-->
      <el-aside width="200px">
        <!--导航栏-->
        <service-nav></service-nav>
        <!--导航栏-->
      </el-aside>
      <!--中间-->
      <el-main>
        <div class="main">
          <router-view></router-view>
        </div>
      </el-main>
    </el-container>
  </div>
</template>

<script lang="ts">
import { defineComponent, ref } from 'vue';
import { useStore } from 'vuex';
import ServiceNav from '../components/Service/ServiceNav.vue';

export default defineComponent({
  name: 'Service',
  components: { ServiceNav },
  setup() {
    const store = useStore();
    const toHome = () => {
      store.commit('changeActiveHead', 'main');
    };
    return {
      toHome,
    };
  },
});
</script>

<style lang="scss" scoped>
.service {
  background-color: rgb(254, 254, 254);
  margin-top: -10px;
  padding-left: 250px;
  padding-right: 250px;
  border-radius: 4px;
  padding-bottom: 10px;
}
.el-breadcrumb {
  margin-left: 10px;
  height: 30px;
  margin-right: 10px;
  line-height: 30px;
  background-color: rgb(245, 245, 245);
}
.main {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
  background-color: #fff;
  margin-top: 20px;
}
.el-aside {
  padding-top: 40px;
  height: 320px;
}
.top {
  padding-top: 10px;
  margin-top: 10px;
}
</style>
